package com.cm.sys.controller;

import org.springframework.boot.web.servlet.error.ErrorController;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.cm.sys.framework.aop.NotCheckIP;
import com.cm.sys.framework.aop.NotCheckLogin;
import com.cm.sys.framework.application.ApiResponseCode;
import com.cm.sys.framework.execption.BusinessException;

import java.util.ArrayList;
import java.util.List;

/***
 * 路径错误跳转页面
 *
 * @author yxq18
 *
 */
@Controller
public class SysController implements ErrorController {

    @RequestMapping("/error")
    @NotCheckLogin
    @NotCheckIP
    public String error() {
        throw new BusinessException(ApiResponseCode.NOT_FOUND.getCode(), ApiResponseCode.NOT_FOUND.getMessage());
    }

    @Override
    public String getErrorPath() {
        return "/error";
    }


    public static void main(String[] args) {




    }
}
